-
Notifications
You must be signed in to change notification settings - Fork 981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove --location from apphosting:rollouts:create and error when more than one backend is found. #8271
Conversation
… than one backend is found.
5450579
to
fd4b2ce
Compare
); | ||
if (backends.length > 1) { | ||
throw new FirebaseError( | ||
`You have multiple backends with the same ${backendId} ID. This is not allowed until we can support more locations. ` + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we already have the backends, think it would be nice to list out locations where the conflict is arising.
logWarning( | ||
`Backends with the following primary regions are unreachable: ${unreachable.join(", ")}.\n` + | ||
"If your backend is in one of these regions, please try again later.", | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we return here? otherwise, it looks like we are throwing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm this was intentional on my end.
If no backend is found, no matter what, I wanted to throw an error.
but IF there are unreachable locations I wanted to warn before throwing that error. the unreachable location may impact the backend the user wants to get, but it may also be completely unreleated.
* Update "location" => "primary region" in the backend display table. (#8205) * Remove --location from apphosting:backend:list. (#8272) * Remove --location from apphosting:rollouts:create and error when more than one backend is found. (#8271) * Remove --location from apphosting:backends:get and return the first backend if multiple are found. (#8260) * Remove `--location` from apphosting:backends:delete (#8262) * Remove --location from apphosting:backends:create and prompt for primary region. (#8264) * Enable FDC connector evolution and insecure operations linter. (#8281) * Enable FDC connector evolution and insecure operations linter. * Enable in VSCode. * Actually get VSCode working. * Replace pkg with yao-pkg/pkg (#8328) Co-authored-by: aalej <[email protected]> * List regions of duplicate backend in warning/error message (#8285) * Update dataconnect.yaml template to v1. (#8346) * Remove support for node 18 (#8334) --------- Co-authored-by: annajowang <[email protected]> Co-authored-by: Joe Hanley <[email protected]> Co-authored-by: Rosalyn Tan <[email protected]> Co-authored-by: aalej <[email protected]>
Description
Remove --location from apphosting:rollouts:create and error when more than one backend is found.
Scenarios Tested
firebase apphosting:rollouts:create chickenbugs
where chickenbugs is the only backend with the name => should succeedfirebase apphosting:rollouts:create chicken
where there are multiple backends with this name => should errorfirebase apphosting:rollouts:create chicken --location us-central1
=> should complain about unknown option --location